﻿// Decompiled with JetBrains decompiler
// Type: DnProcessSimulateCommands.CApWrkWorkingFrameApp
// Assembly: DnProcessSimulateCommands, Version=2402.0.0.890, Culture=neutral, PublicKeyToken=null
// MVID: A885D881-AEDF-447E-852A-6F13102E089C
// Assembly location: C:\Program Files\Tecnomatix_2402\eMPower\DotNetCommands\DnProcessSimulateCommands.dll

using EngineeringInternalExtension;
using Tecnomatix.Engineering;


namespace DnProcessSimulateCommands;

public class CApWrkWorkingFrameApp
{
  private TxFrame m_frame;

  public void SetWorkingFrame(TxTransformation tran)
  {
    this.DeleteFrame();
    TxApplication.ActiveDocument.WorkingFrame = tran;
    TxApplication.RefreshDisplay();
  }

  public void AddWorkingFrameToGraphicViewer(TxTransformation tran)
  {
    this.DeleteFrame();
    this.m_frame = TxFrameEx.CreateFrame(new TxFrameCreationDataEx("workingFrameTemp", tran, true));
    this.m_frame.Color = TxApplication.Options.Color.ManipulatorGuidesColor;
  }

  public void DeleteFrame()
  {
    if (!TxFrame.op_Inequality(this.m_frame, (ITxObject) null))
      return;
    this.m_frame.Delete();
    this.m_frame = (TxFrame) null;
  }
}
